package com.android.webframework;

public abstract class PLinearList<T>
{
	protected int length;
	
	/**
	 * Returns if the list is empty 
	 * @return check if the list is empty
	 * @see boolean
	 */
	public abstract boolean empty();
	
	/**
	 * Returns the size of the list
	 * @return the number of elements in the list
	 * @see int
	 */
	public abstract int size();
	
	/**
	 * Clears the contents of the list
	 */
	public abstract void clear();
	
	/**
	 * Checks to see if the index is valid
	 * @param  index  location to insert in the list
	 * @return the index is valid or not
	 * @see boolean
	 */
	public abstract boolean checkIndex(int index);
	
	/**
	 * Removes the element from the list at the specified index
	 * @param  index the position in the list
	 */
	public abstract void remove(int index);
	
	/**
	 * Gets a value from the list
	 * @param  index the position in the list
	 * @return the value in the list at the specified index
	 * @see Object
	 */
	public abstract Object get(int index);
	
	/**
	 * Returns the index of the element in the list
	 * @param  element the object of interest
	 * @return the index of the specified element
	 * @see int
	 */
	public abstract int indexOf(Object element);
	
	/**
	 * Print the list
	 */
	public abstract void print();
}
